<template>
     <div class="srfx">
    <div class="head">
      <div class="year">
        <div class="head-txt">今年</div>
        <span>{{ srfx.year }}</span>
      </div>
      <div class="year">
        <div class="head-txt">总收入</div>
        <span>{{ srfx.total }}</span>
      </div>
      <div class="last-year">
        <img src="../assets/images/底框.png" alt="" />
        <div class="percent">
          同比
          <i>{{ srfx.contrast }}</i>
        </div>
      </div>
    </div>
    <div class="cut-off-rule">
      <div class="cut-off-left"></div>
      <div class="cut-off-right"></div>
    </div>
    <div class="income-statistics">
      <div class="income-statistics-title">
        <div class="img fl">
          <img src="../assets/images/收入统计.png" alt="" />
        </div>
        <div class="title fl">收入统计</div>
      </div>
    </div>
    <div class="yearly">
      <ul>
        <li v-for="item in srfx.list" :key="item.id">
          <div class="item-year">{{ item.year }}</div>
          <div class="earning">{{ item.income }}</div>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
export default {
     props: ["srfx"],
    data () {
        return {

 
        }
    },
    created(){
        console.log(this.srfx);
    }
}
</script>
 
<style lang = "less" scoped>
    .srfx {
  padding: 12.5px;
  box-sizing: border-box;
  width: 100%;
  background-color: #fff;
  .head {
    width: 100%;
    padding: 10px 20px;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 63px;
    div:nth-of-type(2) {
      border-right: 0;
    }
    .last-year {
      position: absolute;
      bottom: -25px;
      width: 92px;
      height: 30px;
      .percent {
        position: absolute;
        left: 10px;
        top: 14px;
        font-size: 12px;
        color: #666666;
        i {
          color: #003399;
        }
      }
      img {
        width: 100%;
      }
    }
    .head-txt {
      color: #999999;
    }
    span {
      color: #ffcc33;
      font-size: 25px;
      line-height: 30px;
    }
    .year {
      width: 50%;
      margin-left: 15px;
      border-right: 2px solid #e5e5e5;
    }
  }
  .cut-off-rule {
    width: 90%;
    border-bottom: 1px dashed #ddd;
    margin: 0 auto;
    position: relative;
    .cut-off-left {
      position: absolute;
      width: 30px;
      height: 30px;
      background-color: #f5f5f5;
      left: -42px;
      top: -15px;
      border-radius: 50%;
    }
    .cut-off-right {
      position: absolute;
      width: 30px;
      height: 30px;
      background-color: #f5f5f5;
      right: -42px;
      top: -15px;
      border-radius: 50%;
    }
  }
  .income-statistics {
    width: 100%;
    background-color: #fff;
    .income-statistics-title {
      height: 55px;
      line-height: 55px;
      display: flex;
      align-items: center;
      font-size: 18px;
      border-bottom: 1px dashed #e8e8e8;
      .img {
        width: 20px;
        margin-right: 10px;
        height: 40px;
        img {
          width: 100%;
        }
      }
      .title {
        margin-top: 8px;
        color: #7f8491;
      }
    }
  }
  .yearly {
    width: 100%;
    li {
      &:last-child {
        border-bottom: 2px solid #e8e8e8;
      }
      display: flex;
      justify-content: space-between;
      padding: 0 18px;
      height: 35px;
      line-height: 35px;
      border-bottom: 1px dashed #e8e8e8;
      .item-year {
        color: #aaaaaa;
      }
      .earning {
        color: #ffcc33;
      }
    }
  }
}
</style>